﻿using System.ComponentModel.DataAnnotations;

namespace AutoMail.Models
{
    public class SettingDetailsViewModel
    {
        public int? Id { get; set; }
        [Required]
        [Range(0, 23)]
        [Display(Name = "Hour")]
        public ushort BirthdayMailSendTimeHour { get; set; }
        [Required]
        [Range(0, 59)]
        [Display(Name = "Minute")]
        public ushort BirthdayMailSendTimeMinute { get; set; }
        [Required]
        [Range(0, 59)]
        [Display(Name = "Second")]
        public ushort BirthdayMailSendTimeSecond { get; set; }
        [Required]
        [Range(0, 23)]
        [Display(Name = "Hour")]
        public ushort AnniversaryMailSendTimeHour { get; set; }
        [Required]
        [Range(0, 59)]
        [Display(Name = "Minute")]
        public ushort AnniversaryMailSendTimeMinute { get; set; }
        [Required]
        [Range(0, 59)]
        [Display(Name = "Second")]
        public ushort AnniversaryMailSendTimeSecond { get; set; }
        [Required]
        [StringLength(80)]
        [Display(Name = "Smtp Host")]
        public string SmtpHost { get; set; }
        [Required]
        [Range(0, 65535)]
        [Display(Name = "Smtp Port")]
        public ushort SmtpPort { get; set; }
        [StringLength(80)]
        [Display(Name = "User Name")]
        public string? UserName { get; set; }
        [StringLength(80)]
        public string? Password { get; set; }
        [Required]
        [DataType(DataType.EmailAddress)]
        public string From { get; set; }
        [StringLength(20)]
        public string Encoding { get; set; }
        public bool EnableSsl { get; set; }
    }
}
